package com.atguigu.product.products.entity;

import com.atguigu.common.valid.AddVaid;
import com.atguigu.common.valid.ListValue;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 品牌
 * 
 * @author qhw
 * @email qhw@gmail.com
 * @date 2021-08-03 19:57:10
 */
@Data
@TableName("pms_brand")
public class PmsBrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@TableId
	@JsonFormat(shape = JsonFormat.Shape.STRING)
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotEmpty(message = "品牌名称不可以为空",groups = {AddVaid.class})
	private String name;
	/**
	 * 品牌logo地址
	 */
	@NotNull(groups = {AddVaid.class})
	@URL(message = "不是一个正确的url",groups = {AddVaid.class})
	private String logo;
	/**
	 * 介绍
	 */
	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 * 添加自定义校验
	 */
	@NotNull
	@ListValue(vals={0,1},message = "数据不可以输入0或者1之外的",groups = {AddVaid.class})
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
	private String firstLetter;
	/**
	 * 排序
	 */
	private Integer sort;

}
